<?php
/*if(!function_exists('_file_write_contentsAPB')){
function _file_write_contentsAPB($filename = 'file.txt',$word = "你好！n"){
// 确定文件存在并且可写
	if (is_writable($filename)) {
		//打开文件
		if (!$fh = fopen($filename, 'a+b')) {
			 //echo "不能打开文件 $filename";
			 trigger_error ( "Cannot open the file '{$filename}'!" ,  E_USER_ERROR );
			 exit;
		}
		// 写入内容
		if (fwrite($fh, $word) === FALSE) {
			echo "不能写入到文件 $filename";
			exit;
		}
		echo "成功地将 $word 写入到文件 $filename";
		fclose($fh);
	} else {
		//echo "文件 $filename 不可写";
		trigger_error ( "The file '{$filename}' is not writable!" ,  E_USER_ERROR );
	}
}
}*/



if(!function_exists('_file_write_contentsAPB')){
function _file_write_contentsAPB($filename = 'file.txt',$conntent = "你好！n"){
    $file=fopen($filename,"a+b");
	$ret =fwrite($file,$conntent);
	fclose($file);
	return  $ret;
}}
?>